/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jhave.client;

import javax.swing.*;
import java.util.*;
import java.awt.*;
import org.jdom.Element;

/**
 *
 * @author bosmak40
 */
public class Combobox_Option_Element extends JHAVE_Abstract_Combobox_Element implements JHAVE_Element{
    

    Combobox_Option_Element(Element child, JPanel returnedPanel, Vector components, GridLayout grid, JComboBox combobox, JPanel comboBoxPanel){
        super(child, returnedPanel, components, grid, combobox, comboBoxPanel);
    }


     /**
     * Adds an option to the combobox and creates a new comboBoxPanel.
     *
     */
    public void addElementToPanel(){

        if(this.comboBoxPanel == null) {
            this.comboBoxPanel = new JPanel(this.grid);
        } else {
            //grid.setRows(grid.getRows() + 1);
        }
        this.combobox.addItem( child.getText() );
	
    }

    

}
